<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>批量组号查询-Websocket版</title>
    <link href="/static/layui/css/layui.css" rel="stylesheet">
    <script src="/static/layui/layui.js"></script>
    <script src="/static/js/axios.min.js"></script>
    <link rel="shortcut icon" href="/static/groupcheck.ico"/>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree layui-nav-side">
                <li class="layui-nav-item layui-this"><a href="javascript:;">组号检查</a></li>
                <li class="layui-nav-item"><a href="/spidercheck/step1">爬虫检查</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body" style="top:15px;">
        <div style="padding-left: 16px;padding-right: 16px;">
            <form class="layui-form" action="<?php echo $url; ?>" method="post">
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">域名</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请直接从Excel复制原始的域名列过来即可，一次最多支持5000条" class="layui-textarea" lay-verify="required" name="domains" rows="25"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="commit">确认</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    layui.use(['form'], function(){
        var form = layui.form;

        // 提交
        form.on('submit(commit)', function(data){
            var field = data.field; // 获得表单字段
            // 将对象转换为 JSON 字符串
            const jsonMessage = JSON.stringify({flag:'group_check',domains:field.domains});
            console.log(jsonMessage)
        });
    });
</script>
</body>
</html>